{include file="public/head"}
<script src="__JS__/jquery.js" type="text/javascript" charset="utf-8"></script>
<!--2.模块化使用-->
<script src="__STATIC__/dist/layui.all.js" type="text/javascript" charset="utf-8"></script>

<body>
	<div class="x-body">
		<div class="lotus-nav">
			<div class="layui-input-inline">
				<input id="begin" name="begin" class="layui-input lotus-input" placeholder="开始时间" value="{$Request.param.begin}">
			</div>
			<div class="layui-input-inline">
				<input id="end" name="end" class="layui-input lotus-input" placeholder="结束时间" value="{$Request.param.end}">
			</div>
			<button class="layui-btn layui-btn-sm" onclick="search()"><i class="layui-icon layui-icon-search"></i></button>

			<!--<span class="x-right">共有数据:<i class="i_count"></i>条 <button onclick="javascript:location.reload()" class="layui-btn-default "><i class="layui-icon layui-icon-refresh"></i></button></span>-->
		</div>
		<table class="layui-table">
			<thead>
				<tr>
					<th>活动名称</th>
					<th>领券次数</th>
					<th>领券人数</th>
					<th>消耗积分</th>
			</thead>
			<tbody>
				{volist name="data" id="vo"}
				<tr>
					<td>{$vo.title}</td>
					<td>{$vo.couponGets}</td>
					<td>{$vo.couponPeoples}</td>
					<td>{$vo.pointSum}</td>
				</tr>
				{/volist}
			</tbody>
		</table>
	</div>
</body>
<script>
	layui.use('layer', function() { //独立版的layer无需执行这一句
		var $ = layui.jquery,
			layer = layui.layer; //独立版的layer无需执行这一句
		var laydate = layui.laydate,
			upload = layui.upload;

		//执行一个laydate实例
		laydate.render({
			elem: '#begin' //指定元素
				,
			type: 'date'
		});
		//执行一个laydate实例
		laydate.render({
			elem: '#end' //指定元素
				,
			type: 'date'
		});

	});

	function search() {
		var begin = $('#begin').val();
		var end = $('#end').val();

		var urls = "/admin/Stat/coupon/begin/" + begin + '/end/' + end;
		console.log(urls)
		window.location = urls;
	}


</script>
{include file="public/foot"}